package cate.game.play.skill.passive.hero;

import cate.game.play.config.PlayCfgArgs;
import cate.game.play.proce.action.ctx.ActionCtx;
import cate.game.play.proce.turn.AppendTurn;
import cate.game.play.skill.Skill;
import cate.game.play.skill.passive.PassiveHandler;

/**
 * 每回合结束时为己方除自己外生命剩余百分比最低的2个单位附加帝王蟹170%攻击力的【护盾】
 */
public class 圣光指引PH extends PassiveHandler {

	private int 追加技能;

	//追加技能=？？
	@Override
	public void parse(String code) {
		PlayCfgArgs args = new PlayCfgArgs(code);
		追加技能 = args.getInt("追加技能", 0);
	}

	@Override
	public void onRoundEnd(ActionCtx action) {
		Skill appendSkill = action.getCfg().skill.buildById(skill.owner, 追加技能);
		if (appendSkill == null) {
			return;
		}
		action.getRound().addAppendTurn(new AppendTurn(skill.owner, appendSkill));
	}
}
